
(function () {
	var requireU9="2.1.0.0";
	window.u9 = parent.u9||{};
	if(!parent.u9||(parent.u9.v_u9<requireU9)){
		if(parent.u9){
			u9.alert("需要升级U9工作台后才可用");
		}else{
			alert("需要升级U9工作台后才可用");
		}
		return;
	}
	loadCss(u9.toU9URL('lib/ionic/css/ionic.css'));
	loadCss('css/main.css');
	loadJs(u9.toU9URL('lib/requirejs/require.js'), 'js/main');
	loadJsJs("http://api.map.baidu.com/api?v=2.0&ak=4fnwY1lCfnnoW3a55aKaMf9g");
	function loadJs(jspath, datapath) {
		var scriptStr = '<script type="text/javascript" src="' + jspath + '" data-main="' + datapath + '"></script>';
		document.write(scriptStr);
	}
	function loadJsJs(jspath) {
		var scriptStr = '<script type="text/javascript" src="' + jspath + '"></script>';
		document.write(scriptStr);
	}

	function loadCss(path) {
		var fileRef = document.createElement('link');
		fileRef.rel = 'stylesheet';
		fileRef.type = 'text/css';
		fileRef.href = path;
		var headObj = document.getElementsByTagName('head')[0];
		headObj.appendChild(fileRef);
	}
})();